From: Florian Müllner Date: Fri, 18 Feb 2011 01:34:45 +0000 (+0100) Subject: panel: Move statusmenu initialization in the constructor X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8932 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4dec1bc846fc9fc1106083a4986595cc581a4694;p=gnome-shell.git panel: Move statusmenu initialization in the constructor While related to the status area, the user status button is clearly not a status icon, and it does not make too much sense in startStatusArea(), which is about filling the status area with icons. Also, the status icon container is added to the panel in the constructor, in fact, the user status button is the only "toplevel" panel element which is initialized elsewhere. Not a crucial change, but makes for a nice read anyway. https://bugzilla.gnome.org/show_bug.cgi?id=642697 --- diff --git a/js/ui/panel.js b/js/ui/panel.js index f1a5e9097..550ec2e87 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -703,6 +703,10 @@ Panel.prototype = { this._rightBox.add(this._trayBox); this._rightBox.add(this._statusBox); + this._statusmenu = new StatusMenu.StatusMenuButton(); + this._menus.addMenu(this._statusmenu.menu); + this._rightBox.add(this._statusmenu.actor); + Main.statusIconDispatcher.connect('status-icon-added', Lang.bind(this, this._onTrayIconAdded)); Main.statusIconDispatcher.connect('status-icon-removed', Lang.bind(this, this._onTrayIconRemoved)); @@ -762,10 +766,6 @@ Panel.prototype = { this._statusBox.add(indicator.actor); this._menus.addMenu(indicator.menu); } - - this._statusmenu = new StatusMenu.StatusMenuButton(); - this._menus.addMenu(this._statusmenu.menu); - this._rightBox.add(this._statusmenu.actor); }, startupAnimation: function() {